<template>
	<view>
		<!-- 搜索框 -->
		<view class="header1">
			<view class="ipt-box">
				<input v-model="searchIpt" type="text" value="" placeholder="请输入您要搜索的内容" placeholder-class="plac-class" />
				<image src="/static/search1.png" mode="" @tap="searNum"></image>
			</view>
			<view class="header1-right" @tap="clousText">
				<view>场站设备</view> 
				<image src="/static/xiala.png" mode=""></image>
			</view>
		</view>
		<!-- 列表 -->
		<view class="list" v-for="item in 2">
			<view class="left">
				<view class="top">
					<view class="img"></view>
					<view class="title">67835641调压箱</view>
				</view>

				<view class="bottom">
					<image src="/static/pagesB/time.png" mode=""></image>
					<view class="time">07.25-07.31</view>
				</view>
			</view>
			<view class="right" @tap="look">查看</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				searchIpt:''
			}
		},
		methods: {
			clousText(){
				if(this.searchIpt){
					this.searchIpt = ''
					console.log('取消');
				}
			},
			searNum(){
				if(!this.searchIpt){
					uni.showToast({
						title: '请输入要搜索的内容',
						icon: 'none'
					})
					return
				}
				this.$emit('SearchEvents',this.searchIpt)
			},
			look(){
				uni.navigateTo({
					url:'look'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background: #F1F1F1;
		min-height: 100vh;
		// 搜索框
		.header1{
			display: flex;
			justify-content: space-between;
			align-items: center;
			box-sizing: border-box;
			height: 80rpx;
			width: 100%;
			background-color: #003690;
			padding: 0 40rpx;
			.ipt-box{
				display: flex;
				justify-content: space-between;
				align-items: center;
				box-sizing: border-box;
				padding: 0 20rpx;
				width: 480rpx;
				height: 52rpx;
				background-color: #fff;
				border-radius: 24rpx;
				image{
					width: 32rpx;
					height: 32rpx;
				}
			}
			.header1-right{
				display: flex;
				align-items: center;
				font-size: 28rpx;
				color: #E2ECFB;
				image{
					width: 36rpx;
					height: 36rpx;
				}
			}
		}
		// 列表
		.list {
			width: 702rpx;
			height: 118rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 2rpx 6rpx rgba(0, 0, 0, 0.16);
			opacity: 1;
			border-radius: 16rpx;
			margin: 20rpx auto;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding-right: 58rpx;
			.left {
				.top {
					display: flex;
					align-items: center;
					padding-top: 16rpx;
					.img {
						width: 8rpx;
						height: 28rpx;
						background: #003690;
						opacity: 1;
						border-radius: 200rpx;
					}
					.title {
						padding-left: 36rpx;
						font-size: 28rpx;
						font-family: Source Han Sans SC;
						font-weight: 400;
						color: #333333;
						opacity: 1;
					}
				}
				.bottom {
					display: flex;
					align-items: center;
					padding: 16rpx 0 22rpx 36rpx;
					
					image {
						width: 28rpx;
						height: 28rpx;
					}
					.time {
						padding-left: 10rpx;
						font-size: 24rpx;
						font-family: Source Han Sans SC;
						font-weight: 400;
						color: #777777;
						opacity: 1;
					}
				}
			}
			.right{
				width: 94rpx;
				height: 46rpx;
				border: 2rpx solid #003690;
				opacity: 1;
				border-radius: 16rpx;
				color: #003690;
				text-align: center;
			}
		}
		
	}
</style>
